 public ListNode reverseList(ListNode head) {
        if(null == head) {
            return null;
        }
        ListNode cur = head.next;
        ListNode prev = head;
        
        while(null!=cur) {
            ListNode next = cur.next;
            cur.next = head;
            head = cur;
            cur = next;
        }
        prev.next = null;
        return head;
    }
}